package com.diamond.smart.third.controller;

import com.diamond.common.utils.R;
import com.diamond.smart.third.service.MapService;
import com.diamond.smart.third.to.Geocodes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RequestMapping("third/map")
@RestController
public class MapController {

    @Autowired
    MapService mapService;

    @GetMapping("/location")
    public R getLocation() {
        List<Geocodes> geocodes = mapService.getLocation();
        return R.ok().put("data",geocodes);
    }

}
